// levels.js - 关卡数据文件
const levels = {
    1: {
        platforms: [
                    { x: 1000, y: 100, width: 80, time: "<=10" },      
                    { x: 2000, y: 100, width: 80, time: "8" },                    
		    { x: 2100, y: 200, width: 80, time: "<=7" },
                    { x: 2200, y: 300, width: 80, time: "2n" },
                    { x: 2300, y: 400, width: 80, time: ">=5" },    
                ],
                walls: [ 
                    { x: 1300, y: 0, height: 250, time: "<=10" },
                    { x: 2500, y: 0, height: 500, time: "<=10" },
                    { x: 2500, y: 500, height: 500, time: "4*" },
 		    { x: 3000, y: 0, height: 300, time: "8*" },
                ],
                door: { x: 3600, y: 0 },
                playButton: { x: 1800, y: 100 },
		signs: [
			{
				x: 200,
                    		y: 300,
                   		width: 500,
                   		height: 100,
                    		text: "欢迎来到教学关卡，按住A/D分别可以左右移动",
                    		fontSize: 24,
                    		color: "#ffffff"
			},
			{
				x: 800,
                    		y: 300,
                   		width: 500,
                   		height: 100,
                    		text: "按K可以跳跃，在空中再次按下K可以二段跳。在平台上按住s可以下落",
                    		fontSize: 24,
                    		color: "#ffffff"
			},
			{
				x: 1400,
                    		y: 300,
                   		width: 500,
                   		height: 100,
                    		text: "触碰播放按钮后，你头顶的时间会开始流动，当时间归零，游戏结束。可以通过esc按键快速重启关卡",
                    		fontSize: 24,
                    		color: "#ffffff"
			},
			{
				x: 2000,
                    		y: 100,
                   		width: 400,
                   		height: 100,
                    		text: "只有头上的秒数和平台上对应数字的表述相匹配，平台才会激活",
                    		fontSize: 24,
                    		color: "#ffffff"
			},
			{
				x: 2000,
                    		y: 200,
                   		width: 500,
                   		height: 100,
                    		text: "kn表示k的倍数秒该平台才会激活",
                    		fontSize: 24,
                    		color: "#ffffff"
			},	
			{
				x: 2000,
                    		y: 300,
                   		width: 500,
                   		height: 100,
                    		text: "x*表示第x秒这个平台才会消失",
                    		fontSize: 24,
                    		color: "#ffffff"
			},
			{
				x: 2500,
                    		y: 300,
                   		width: 500,
                   		height: 100,
                    		text: "触碰沙漏可以反转头顶的时间流向",
                    		fontSize: 24,
                    		color: "#ffffff"
			},
			{
				x: 3100,
                    		y: 300,
                   		width: 500,
                   		height: 100,
                    		text: "只有获得所有钥匙大门才会开启",
                    		fontSize: 24,
                    		color: "#ffffff"
			},
		],
		keys: [
			{x: 3500,y: 100},
		],
		hourglasses:[
			{x: 2700, y: 100},
		]
    },
    // 其他关卡可以在这里添加...
    // 2: { ... },
    // 3: { ... },
    // ...
    // 24: { ... }
};